home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d16
/
oriel.arc
/
README.TXT
< prev
next >
Wrap
Text File
|
1991-07-31
|
13KB
|
340 lines
***** README.TXT file for Oriel for Windows, Version 1.1 *****
**The Oriel for Windows Demo Program**
Oriel for Windows comes with a demonstration program named
DEMO.ORL. We invite you to try it out. The DEMO.ORL program
actually serves as a shell to call various other Oriel
sample programs. These sample programs show you different
ways you might use Oriel and provide example code that you
can use as a reference when building your own Oriel
programs.
In order for the DEMO.ORL program to work, it, and all
the files that come with it, must be in the same directory
as the Oriel executable file (ORIEL.EXE). If you used the
SETUP.EXE program that comes on the Windows 3 Power Tools
diskette to install Oriel, this should already be the case.
See Appendix A of the Windows 3 Power Tools book for
information on how to use the SETUP.EXE program.
You can run the DEMO.ORL program in one of two ways. On
the one hand, you can use the File Run command from either
Program Manager or File Manager. For example, if you
intalled Oriel in the C:\WINDOWS\PWR-TOOL\ORIEL directory,
you can run the DEMO.ORL program by using the following
command line for the the File Run command:
C:\WINDOWS\PWR-TOOL\ORIEL\ORIEL.EXE DEMO.ORL
When you press ENTER to confirm this command line, the main
DEMO.ORL screen is displayed. Follow the instructions on
your screen to take a tour of Oriel.
**Managing Files and Directories**
We've added nine new functions to the Oriel for Windows
command language that let you manage files and directories.
These functions are not described in the book. The sections
that follow explain what these functions are and give
examples of their use.
FileCopy
The FileCopy command lets you copy one or more files from
one directory to another. You can also copy a file and
rename it in the process. If the file already exists in the
target location, the FileCopy command will overwrite it.
This command takes the following form:
FileCopy("Source-name",Destination-name",Result)
The "Source-name" argument defines the path and name of
the file (or files) you want to copy. If the file is located
outside the current directory or on a different drive, make
sure you include the full path and file name--for example,
"D:\ACCTG\BUDGET.ASC". You can also use the standard DOS
wildcards (* and ?) to define a group of files to copy--for
example "D:\ACCTG\*.ASC".
The "Destination-name" argument defines the target
location (and optionally the new name) of the copied file.
Normally, this will be a directory--for example, "\BACKUP\".
Notice that backslash follows the name of the directory.
This is required. If the directory is located on a different
drive, make sure you include the drive designation in the
directory path--for example "D:\BACKUP\". You can also use
the DOS * wildcard in the "Destination-name" argument to
rename a group of files with a different extension--for
example "D:\BACKUP\*.BAK". However, the ? wildcard is not
supported. Finally, if you are copying a single file, you
can define a new name for the file in the target location--
for example, "D:\BACKUP\BACKBUD.TXT".
The Result argument is simply the name of a variable
that indicates whether the copy operation was successful. If
the operation was successful, this variable takes on a value
of 1. Otherwise, it is given a value of 0. Although, the
name "Result" is used for this variable here, you can use
any name you want--for example, There1.
The following example copies all files in the directory
C:\BUDGET\ that have a .TXT extension to a directory named
\BACKUP\ on drive D:
FileCopy("C:\BUDGET\*.TXT","D:\BACKUP\",Result)
FileDelete
The FileDelete command lets you delete one or more files.
This command takes the following form:
FileDelete("Filename",Result)
The "filename" argument defines the name of the file
you want to delete. If the file is located outside the
current directory or on a different drive, precede the file
name with the needed path--for example,
"D:\ACCTG\OLDFILE.BAK". You can also define a group of files
to delete by using the standard DOS wildcards * and ?--for
example, "D:\ACCTG\*.BAK".
The Result argument is a name of a variable that
indicates whether the deletion was successful. If the file
has been deleted, this variable is assigned a value of 1.
Otherwise a value of 0 is assigned. You can use any name you
want for this variable--for example, There1.
The following example, deletes the file name BUDGET.BAK
in the directory name \ACCTG\ on drive D:
FileDelete("D:\ACCTG\BUDGET.BAK",Result)
FileExist
The FileExist command lets you determine whether a file
exists. This command takes the form:
FileExist("Filename",Result)
The "Filename" argument defines the name of the file
whose existence you want to verify. If the file is located
outside the current directory or on a different drive,
precede the file name with the appropriate path information-
-for example, "D:\ACCTG\OLDFILE.BAK". The Result argument is
a variable that indicates whether the file exists or not. If
the file does exist, this variable is assigned a value of 1.
Otherwise it is assigned a value of 0.
The following example, verifies the existence of a file
named OLDFILE.BAK in the \ACCTG directory on drive D:
FileExist("D:\ACCTG\OLDFILE.BAK",Result)
FileMove
The FileMove command lets you move one or more files from
one directory to another. (This is accomplished by copying
the file to the destination location first and then removing
it from the source location.) If the file already exists in
the destination location, FileMove overwrites it. This
command takes the following form:
FileMove("Source-name","Destination-name",Result)
The "Source-name" argument defines the name of the file
you want to move. If the file is located outside the current
directory or on a different drive, make sure you include the
full path and file name--for example, "D:\ACCTG\BUDGET.ASC".
You can also use the standard DOS wild-cards (* and ?) to
define a group of files to move--for example
"D:\ACCTG\*.ASC".
The "Destination-name" argument defines the destination
location for the moved file. Normally, this will be a
directory--for example, "\BACKUP\". Notice that backslash
follows the name of the directory. This is required. If the
directory is located on a different drive, make sure you
include the drive designation in the directory path--for
example "D:\BACKUP\". You can use the DOS * wildcard in the
"Destination-name" argument to rename file with a different
extension--for example "D:\BACKUP\*.BAK". However, use of
the ? wild card is not supported.
The Result argument is the name of a variable that
indicates whether the move operation was successful. If the
operation was successful, this variable takes on a value of
1. Otherwise, it is given a value of 0. Although, the name
"Result" is used here, you can use any name you want--for
example, There1.
The following example moves the file BUDGET.TXT from
the \ACCTG\ directory on drive C to the \BACKUP\ directory
on drive D:
FileMove("C:\ACCTG\BUDGET.TXT","D:\BACKUP\",Result)
FileRename
The FileRename command lets you change the name of one or
more files. If a file already exists under the new name in
the destination location, the FileRename command will
overwrite it. This command takes the following form:
FileRename("Source-name","Destination-name",Result)
The "Source-name" argument defines the path and name of
the file or files you want to rename. If the file is located
outside the current directory or on a different drive, you
must include the full path and file name--for example,
"D:\ACCTG\BUDGET.ASC". You can also use the standard DOS
wild-cards (* and ?) to define a group of files to rename--
for example "D:\ACCTG\*.ASC".
The "Destination-name" argument defines the new name
for the file. If the file you are renaming is located
outside the current directory or on a different drive, make
sure you include both the full path and new name for the
file--for example "D:\ACCTG\BUDBACK.BAK". You can also use
the DOS * wildcard in the "Destination-name" argument to
rename a group of files with a different extension--for
example "D:\BACKUP\*.BAK". However, the ? wild card is not
supported.
The Result argument is the name of a variable that
indicates whether the renaming operation was successful. If
the operation was successful, this variable is assigned a
value of 1. Otherwise, it is given a value of 0. Although,
the name "Result" is used here, you can use any name you
want for this variable--for example, There1.
The following example renames the file BUDG.WK1 in the
directory \ACCTG on drive C: with the same name and a .BAK
extension:
FileRename("C:\ACCTG\BUDG.WK1","C:\ACCTG\BUDG.BAK",Result)
DirChange
The DirChange command lets you make a specific directory
current. If the directory you attempt to make current does
not exist, this command will fail. This command takes the
following form:
DirChange("Directory-name",Result)
The "Directory-name" argument defines the name of the
directory you want to make current. If the directory is on
another drive, you must precede the directory name with the
appropriate drive designation--for example,
"D:\ACCTG\BUDGET\".
The Result argument is the name of a variable that
indicates whether the directory change operation was
successful. If the operation was successful, this variable
is assigned a value of 1. If it was unsuccessful--the
directory does not exist--this variable is assigned a value
of 0. Although the name Result is used here for this
variable, you can use any name you want--for example,
There1.
DirMake
The DirMake command lets you create a new directory. This
command takes the following form:
DirMake("Directory-name",Result)
The "Directory-name" argument defines the name of the
directory you want to create. You must specify a fully
qualified path for the new directory--for example,
"C:\ACCT\BUDGET".
The Result argument is a variable name that indicates
whether the create directory operation was successful. If it
was, this variable is assigned a value of 1. If the
operation was not successful--for example, an element of the
pathname does not exist--the Result variable is assigned a
value of 0. Although the name Result is used for this
variable here, you can use any name you want--for example,
There1.
The following example creates a subdirectory named
\MYFILES on the \WINDOWS directory on drive C:
DirMake("C:\WINDOWS\MYFILES",Result)
DirRemove
The DirRemove command lets you delete an existing directory.
If the directory does not exist or contains files, this
command will fail. This command takes the following form:
DirRemove("Directory-name",Result)
The "Directory-name" argument defines the name of the
directory you want to delete. You must specify a fully
qualified path for the directory--for example,
"C:\ACCT\BUDGET".
The Result argument is a variable that indicates
whether deletion of the directory was successful. If it was
successful, this variable is assigned a value of 1. If the
operation was not successful--for example, an element of the
pathname does not exist--the Result variable is assigned a
value of 0. Although the name Result is used for this
variable here, you can use any name you want--for example,
There1.
The following example deletes a subdirectory named
\MYFILES of the \WINDOWS directory on drive C:
DirRemove("C:\WINDOWS\MYFILES",Result)
DiskChange
The DiskChange command lets you make another disk drive
current. When you change disk drives with this command, the
directory that was last used on that drive becomes the
current directory. This command takes the following form:
DiskChange("Drive-letter",Result)
The "Drive-letter" argument lets you define the letter
of the drive you want to make current--for example "D". You
do not need to supply a colon. (In fact, anything after the
first letter is ignored.)
The Result argument is simply the name of a variable
that indicates whether the disk change operation was
successful. If it was, this variable is assigned a value of
1. If it was not successful, this variable is assigned a
value of 0. Although the name "Result" is used here for this
variable, you can use any name you want--for example,
There1.
The following example, makes drive E the current drive:
DiskChange("E",Result)
Note: You can use the DiskChange command before using the
FileCopy, FileDelete, FileExist, FileMove, FileRename,
DirChange, or DirRemove command. That way, you don't need to
specify a drive designation in the arguments for these
commands.
We sincerely hope you enjoy Oriel for Windows, Version 1.1.
The LeBlond Group, Inc.